﻿@model ShivamEMR.Model.Domain.DoctorsDomain.Doctor

@{
    ViewBag.Title = "New";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<h2>New Doctor</h2>

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)
    <fieldset>
        <legend>Doctor</legend>
                <div class="editor-label">
                    Employee
                </div>
                <div class="editor-field">
                    @Html.DropDownListFor(model => model.ID, ((IEnumerable<ShivamEMR.Model.Domain.CompanyDomain.Employee>)ViewBag.Employees).Select(option => new SelectListItem
                {
                    Text = Html.DisplayTextFor(_ => option.FullName).ToString(),
                    Value = option.ID.ToString(),
                    Selected = (Model != null) && (option.ID == Model.ID)
                }), "Choose...")
                    @Html.ValidationMessageFor(model => model.ID)
                </div>


                  <div class="editor-label">
                    Specialties
                </div>
                <div class="editor-field">
                    @Html.DropDownListFor(model => model.Specialties, ((IEnumerable<ShivamEMR.Model.Domain.DoctorsDomain.Specialty>)ViewBag.Specialties).Select(option => new SelectListItem
                {
                    Text = Html.DisplayTextFor(_ => option.Title).ToString(),
                    Value = option.ID.ToString()/*,
                    Selected = (Model != null) && (option.ID == Model.Specialties)*/
                }),new {@multiple="multiple"})
                    @Html.ValidationMessageFor(model => model.ID)
                </div>
        <p>
            <input type="submit" value="Create" />
        </p>
    </fieldset>
}

<div>
    @Html.ActionLink("Back to List", "Index")
</div>